const promiseError=()=>new Promise((resolve,reject)=>{
    resolve('舒服')
    setTimeout(()=>{
        reject('错误啦')
    },2000)
})
async function run(){
    let [res, err] = await promiseError().then(
    v => [v, null],
    err => [null,err]
 )
 if(err){
    console.log(err);
 }else{
    console.log(res);
 }
//  console.log(err);
}
run()

